package com.bt.lms.service.impl;

import com.bt.lms.entity.EmploymentInfo;
import com.bt.lms.dao.servise.StuEmploymentInfoDao;
import com.bt.lms.dao.servise.impl.StuEmploymentInfoDaoImpl;
import com.bt.lms.service.StuEmploymentInfoService;

import java.sql.SQLException;

/**
 * 就业信息服务实现
 */
public class StuEmploymentInfoServiceImpl implements StuEmploymentInfoService {

    @Override
    public boolean edit(Long id, EmploymentInfo employmentInfo) throws SQLException {
        StringBuilder employmentSqlSB = new StringBuilder();
        employmentSqlSB.append("update employment_info set")
                .append(" firm_name = ?,firm_site = ?,protocol_confirm_date = ?")
                .append(",register_date = ?,firm_type = ?,firm_describe = ?")
                .append(" where stu_status_Info_id = ?");
        String sql = new String(employmentSqlSB);


        StuEmploymentInfoDao stuEmploymentInfoDao = new StuEmploymentInfoDaoImpl();
        stuEmploymentInfoDao.update(sql,employmentInfo,id);
        return true;
    }



}
